home *** CD-ROM | disk | FTP | other *** search
- // create a namespace for our Utils.
- var BartBrowserUtils = BartModule.createNamespace("bart.ibrowser.BrowserUtils");
-
- BartBrowserUtils.openNewLocation = function(url)
- {
- window.content.document.location = url;
- window.content.focus();
- };
-
- /**
- * Open a new tab.
- * Select indicates if the new opened tab should be active. Default is true.
- * Return the new created tab.
- */
- BartBrowserUtils.newTab = function(url, select)
- {
- var u = url || "";
- var s = (select == undefined ? true : select);
-
- var t = window.getBrowser().addTab(u);
- if(s)
- window.getBrowser().selectedTab = t;
-
- return t;
- };